package com.neusoft.bizcore.web.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.filter.OncePerRequestFilter;

/**
 * Xss filter
 *
 * @author sunchf
 * @date 2018年12月7日 上午9:42:53
 */
public class XssSqlFilter extends OncePerRequestFilter {

    @Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
            throws ServletException, IOException {

        final String excludes = this.getFilterConfig().getInitParameter("excludes");
        filterChain.doFilter(new XssSqlRequestWrapper(request, excludes), response);
    }

}
